/**
 * 查看图书
 * @param params
 * @returns {*}
 */
function getBookList (params) {
  return $axios({
    url: '/book/page',
    method: 'get',
    params
  })
}

/**
 *
 * 修改图书状态
 * @returns {*}
 */
const switchStatus = (id) => {
  return $axios({
    url: `/book/status`,
    method: 'put',
    params: { id }
  })
}

// 获取图书类型下拉框
function getType(){
  return $axios({
    url: '/book/getType',
    method: 'get',
  })
}


// 删除当前列的接口
const deleBook = (ids) => {
  return $axios({
    url: '/book',
    method: 'delete',
    params: { ids }
  })
}

// 推荐图书
const hotBook = (id) => {
  return $axios({
    url: '/book/recommend',
    method: 'get',
    params: { id }
  })
}

